package service.manager.impl;

import dao.manager.Borrow_booksDao;
import dao.manager.impl.Borrow_booksDaoIml;
import entity.Books;
import entity.Borrow_books;
import entity.Pages;
import service.manager.Borrow_booksService;

import java.util.List;

/**
 * Borrow_booksServiceImpl
 *
 * @author 谭文斌
 * @since 2023/9/4
 */
public class Borrow_booksServiceImpl implements Borrow_booksService {
    Borrow_booksDao borrow_booksDao =new Borrow_booksDaoIml();


    @Override
    public List<Borrow_books> getList(String condition, String conditionValue, Pages<Borrow_books> pages) {
        int pageSize = pages.getPageSize();
        int pageIndex = (pages.getPageCountNo() - 1) * pageSize;
        return borrow_booksDao.getList(condition,conditionValue,pageIndex,pageSize);
    }

    @Override
    public int pageCount(String condition, String conditionValue) {
        return borrow_booksDao.pageCount(condition, conditionValue);
    }
}
